package Offer;

import java.util.Arrays;

public class Test44 
{

	public static void main(String[] args) 
	{
		int[] array={4,0,3,5,7};
		System.out.println(isContinuous(array));
	}
    public static boolean isContinuous(int[]array)
    {
    	if(array==null)
    		return false;
    	Arrays.sort(array);
    	int zero=0;
    	for(int i=0;i<array.length;i++)
    	{
    		if(array[i]==0)
    		{
    			zero++;
    		}
    	}
    	int gap=0;
    	for(int i=zero;i<array.length-1;i++)
    	{
    		if(array[i]==array[i+1])
    			return false;
    		gap+=array[i+1]-array[i]-1;
    	}
    	if(zero>=gap)
    		return true;
    	else
    		return false;
    }
}
